using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using User.Models;
using UserSorce.Entity.Models;

namespace User.Service
{
    public class InventoryServiceModels
    {
        public InventorysModels TurnOffInventoryData(Users userData, int typeId,int InventoryId)
        {
            foreach (var item in userData.Inventory)
            {
                if (item.InventoryId==InventoryId)
                {
                    InventorysModels inventory = new InventorysModels()
                    {
                        UserId = item.UserId,
                        TypeId = item.TypeId,
                        InventoryId=item.InventoryId,
                        InventoryName=item.InventoryName,
                        Matter = item.Matter
                    };
                    return inventory;
                }
            }
            return null;
        }
    }
}
